package com.stardust.pojo;
/**
 * 实现登录鉴权认证基础服务
 */

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class ResultControl {
    public final static int OK = 200;
    public final static int ERROR = 500;

    public int code;//验证码
    public String message;
    public Map<String,Object> data;//用于存储htmlpost的map<String,Object>

    public ResultControl() {
        this.code = OK;
        this.data = new HashMap<String, Object>();
    }

    public ResultControl(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {

        return code;
    }

    public String setCode() {
        float random=new Random().nextFloat();
        int code = (int) (random*1000);
        return String.valueOf(code);
    }
}
